
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	
NOTE: the do-files 00_master_wage_imp, 01_split_episodes, 04_merge_basic_BHP, 
05_educ_broad, 06_wages_assessment_ceiling, 07_wages_marginal, 
08_wages_deflation, and 10_wages_imputation build on the do-files offered by 
Heiko Stüber, Wolfgang Dauth, Johann Eppelsheimer (see blow) but were slightly 
adjusted to run the code on our sample of the BeH.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


cap log close
if(${logfile}==1) log using ${log}\05_educ_broad.log, replace


/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	
	Create broader education groups based on imputed education ("ausbildung_imp")
	
	Generates the variable educ: Education (university and university of applied science combined), imputed based on Fitzenberger et al. (2006)
	Fitzenberger, B., A. Osikominu, and R. Völter (2006): Imputation Rules to Improve the Education Variable in the IAB Employment Subsample. Schmollers Jahrbuch. Zeitschrift für Wirtschafts- und Sozialwissenschaften 126(3), 405-436.

	
	Author(s): Wolfgang Dauth, Johann Eppelsheimer, Heiko Stüber
	
	Version: 1.0
	Created: 2022-11-24
	
	Note: 
	This do-file is part of the Stata do-file collection offered as a 
	supplement to Stüber, Dauth, and Eppelsheimer (2023): A Guide to Preparing 
	the Sample of Integrated Labour Market Biographies (SIAB, version 7519 v1) 
	for Scientific Analysis. Journal for Labour Market Research, 57:7.
	https://doi.org/10.1186/s12651-023-00335-w
	
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/


********************************************************************************
* Generate a more general education variable based on imputed education from the FDZ
********************************************************************************
* Generate broader education classes
tab ausbildung_imp, mis
gen educ = .
replace educ = 3 if inlist(ausbildung_imp, 5, 6)	// degree from an university (Universität) or university of applied science (Fachhochschule)
replace educ = 2 if inlist(ausbildung_imp, 2, 4)	// vocational training (Ausbildung)
replace educ = 1 if inlist(ausbildung_imp, 1, 3)	// neither vocational training nor degree from university (of applied science)


* Define and set labels
label variable educ "Education, imputed based on Fitzenberger, Osikominu, & Voelter (2006)"
label define lblValEducen 1 "1 no vocational training" 2 "2 vocational training" 3 "3 university or university of applied science"
label values educ lblValEducen

********************************************************************************
* Comparison
********************************************************************************
if(${inspect}==1) tab ausbildung_imp educ, m


cap log close
